﻿using System.IO;
using System.Text.RegularExpressions;

namespace F2FTraderq
{
    class WordCount
    {
        public static int WordCounts1(string pattern)
        {
            MatchCollection collection = Regex.Matches(File.ReadAllText(new Main().MainPath +
                                                                        new Main().DoubleDash +
                                                                        new Main().Year +
                                                                        new Main().DoubleDash +
                                                                        new Main().Month +
                                                                        new Main().DoubleDash +
                                                                        new Main().DayNumber +
                                                                        new Main().DoubleDash +
                                                                        new Main().DayOfWeek +
                                                                        ".txt"), pattern);
            return collection.Count;
        }
    }
}
